<?php
	require_once("web_fns.php");
	$demand_text = trim($_POST['demand_text']);
	$user_id = $_POST['user_id'];
	$check_result = create_helpbuy_order($orders_table,$demand_text,$user_id);
	switch($check_result) {
		//订单生成成功
		case 1:
			echo "1";
			break;
		
		//同一个session反复提交
		case 2:
			echo "2";
			break;
		//查询发生错误或提交失败
		default:
			echo "0";
	}
?>